package com.javaEE.tes.services;

import com.javaEE.tes.dao.AssociationRepository;
import com.javaEE.tes.dao.dto.StudentAssociation;
import com.javaEE.tes.entities.Association;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AssociationService {
    @Autowired
    AssociationRepository associationRepository;

    public Association save(Association association){
        return associationRepository.save(association);
    }

    public List<Association> getAll(){return associationRepository.findAll();}

    public List<StudentAssociation> studentAssociation(){return associationRepository.studentAssociation();}
}
